﻿Ext.define('yzmh.view.author.List', {
    extend: 'Ext.grid.Panel',
    alias: 'widget.authorlist',
    title: '',
    store: 'Authors',
    closable: true,
    loadMask: true,
    columnLines: true,
    forceFit: true,
    viewConfig: {
        trackOver: false,
        stripeRows: true
    },
    tbar: [
            '查询: ', ' ', { xtype: 'tbfill' }, { action: 'htmlall', text: '生成全部作者', icon: 'extjs/icons/html_go.png' }, "-", { action: 'html', text: '生成html', icon: 'extjs/icons/html_go.png' }, "-", { action: 'add', text: '新建', icon: 'extjs/icons/user_add.png' }, "-", { action: 'delete', text: '删除', icon: 'extjs/icons/user_delete.png' }
    ],
    selType: 'rowmodel',
    selModel: Ext.create("Ext.selection.RowModel", {
        mode: 'MULTI'
    }),
    columns: [
        { header: '编码', dataIndex: 'id', width: 10 },
        { header: '作者名称', dataIndex: 'zzmc', width: 20 },
        { header: '别名', dataIndex: 'zzbm', width: 20 },
        { header: '地区', dataIndex: 'diqu', width: 10},
        { header: '字母', dataIndex: 'zm', width: 10 },
        { header: '作者图片', dataIndex: 'zztp' },
        { header: '漫画总数', dataIndex: 'ccount', width: 10 },
        {
            action: 'tjchange',
            xtype: 'actioncolumn',
            dataIndex: 'tj',
            width: 10,
            header: '推荐',
            align: 'center',
            renderer: function (value) {
                this.icon = value ? 'extjs/icons/accept.png' : 'extjs/icons/s.gif';
            }
        }, {
            action: 'view',
            xtype: 'actioncolumn',
            width: 10,
            header: '预览',
            align: 'center',
            icon: 'extjs/icons/page_link.png'
        },
        {
            action: 'search',
            xtype: 'actioncolumn',
            width: 10,
            header: '状态',
            align: 'center',
            icon: 'extjs/icons/book_go.png'
        }
    ],
    bbar: {
        xtype: 'pagingtoolbar',
        store: 'Authors',
        displayInfo: true,
        displayMsg: '显示数据 {0} - {1} of {2}',
        emptyMsg: "没有查询到数据",
        items: [{
            xtype: 'progressbar',
            text: '正在初始化...',
            width: 200,
            hidden: true
        }]
    }
});
